package day5;

import java.util.Date;

public class Person extends Animal{
    //反射得到4个Field类 来表示下面的4个属性 也可以获取父类的
    private String name;
            Integer age;
    protected double money;
    public Date time;

    //学习
    public void study(){
        System.out.println("人类开始学习");
    }
    //游戏
    private void play(String str){
        System.out.println("人类开始玩游戏:"+str);
    }
    public Person(String name, Integer age, double money, Date time) {
        this.name = name;
        this.age = age;
        this.money = money;
        this.time = time;
    }
    public Person(String name, Integer age) {
        this.name = name;
        this.age = age;
    }
    private Person(){}
}
class Animal{
    public String type;//高级动物
    public void eat(){
        System.out.println("动物开始吃饭");
    }
}